<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <div class="section">
                <h1>Visualizar</h1>
                <h:form id="userForm" enctype="multipart/form-data">
                    <p:growl id="messages" showDetail="true" autoUpdate="true"  /> 
                        <div class="container_24 clearfix">
                            <h3 style="margin:0 0 10px 0">Dados Gerais</h3>
                            <div class="clear" />
                            <p:outputLabel value="Nome: " styleClass="grid_3 labelBold"/>
                            <h:outputText styleClass="grid_20" value="#{managerSearchUser.showUser.name}" />
                            <div style="clear: both" />

                            <p:outputLabel value="Cargo: " styleClass="grid_3 labelBold" />
                            <h:outputText styleClass="grid_20" value="#{managerSearchUser.showUser.post}" />
                            <div style="clear: both" />

                            <p:outputLabel value="Login: " styleClass="grid_3 labelBold" />
                            <h:outputText styleClass="grid_20" value="#{managerSearchUser.showUser.login}" />
                            <div style="clear: both" />

                            <h3 style="margin:0 0 10px 0">Acesso</h3>
                            <div class="clear" />
                            <p:dataTable id="tableAcesso" var="g" value="#{managerSearchUser.showGroups}" 
                                            styleClass="grid_24"
                                            rowIndexVar="rowid"
                                            rowKey="#{u.id}"
                                            rows="5" paginator="true"  
                                            paginatorPosition="bottom"
                                            emptyMessage="Nenhum registro">  
                                <f:facet name="header">
                                    Nível de Acesso
                                </f:facet>
                                <p:column headerText="Grupo" width="600">  
                                    <h:outputText value="#{g.name}"/>
                                </p:column>  

                            </p:dataTable> 

                            <br/>
                            <div class="buttonAction">

                                <p:button href="searchuser.xhtml" value="Voltar"  icon="ui-icon-arrowreturnthick-1-w" />
                            </div >
                    </div>
                </h:form>
            </div>
        </ui:define>
    </ui:composition>

</html>
